var BaseIcon = GObject.registerClass(
class BaseIcon extends St.Bin {
_init(label, params) {
- params = Params.parse(params, { createIcon: null,
- setSizeManually: false,
- showLabel: true });
+ params = Params.parse(params, {
+ createIcon: null,
+ setSizeManually: false,
+ showLabel: true,
+ });
let styleClass = 'overview-icon';
if (params.showLabel)
if (!this._setSizeManually)
throw new Error('setSizeManually has to be set to use setIconsize');
- if (size == this.iconSize)
+ if (size === this.iconSize)
return;
this._createIconTexture(size);
size = found ? len / scaleFactor : ICON_SIZE;
}
- if (this.iconSize == size && this._iconBin.child)
+ if (this.iconSize === size && this._iconBin.child)
return;
this._createIconTexture(size);
}
function zoomOutActorAtPos(actor, x, y) {
- let actorClone = new Clutter.Clone({ source: actor,
- reactive: false });
+ const actorClone = new Clutter.Clone({
+ source: actor,
+ reactive: false,
+ });
let [width, height] = actor.get_transformed_size();
actorClone.set_size(width, height);
this._resetAnimationActors();
let actors = this._getChildrenToAnimate();
- if (actors.length == 0) {
+ if (actors.length === 0) {
this._animationDone();
return;
}
let [adjustedSourcePositionX, adjustedSourcePositionY] = [sourceCenterX - sourceScaledWidth / 2, sourceCenterY - sourceScaledHeight / 2];
let movementParams, fadeParams;
- if (animationDirection == AnimationDirection.IN) {
- let isLastItem = actor._distance == minDist;
+ if (animationDirection === AnimationDirection.IN) {
+ const isLastItem = actor._distance === minDist;
actorClone.opacity = 0;
actorClone.set_scale(scaleX, scaleY);
delay,
};
} else {
- let isLastItem = actor._distance == maxDist;
+ const isLastItem = actor._distance === maxDist;
let [startX, startY] = actor._transformedPosition;
actorClone.set_translation(startX, startY, 0);